﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MyDay13.Models;
namespace MyDay13.Context
{
   public class Day13Context:DbContext
    {
        public Day13Context(DbContextOptions<Day13Context> options)
            : base(options)
        {

        }
        public DbSet<D13Meno> D13Meno { get; set; }
        public DbSet<D13Power> D13Power { get; set; }
        public DbSet<D13Role> D13Role { get; set; }
        public DbSet<D13RolePowerTable> D13RolePowerTable { get; set; }
        public DbSet<D13User> D13User { get; set; }
        public DbSet<D13UserRoleTable> D13UserRoleTable { get; set; }
        public DbSet<BaseModel> BaseModel { get; set; }
        public DbSet<OperationModel> OperationModel { get; set; }
        public DbSet<MenuOperationModel> MenuOperationModel { get; set; }
        public DbSet<RoleMenuOperationModel> RoleMenuOperationModel { get; set; }


        protected override  void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
                optionsBuilder.UseSqlServer("Data Source=.;Initial Catalog=IOT.MyDay13Work;Integrated Security=True");
            }
        }
      
        protected override  void OnModelCreating(ModelBuilder modelBuilder)
        {

        }

    }
}
